
a = 10
def fun1():
    d = 10
    b = a + d
    return b
c = fun1()
print(c)

def pow_factory(para):
    def sub_fun1(p):
        return p ** 2
    def sunb_fun2(p):
        return p ** 3
    if para == 2:
        return sub_fun
    else
        return sub_fun2
pow2 = pow_factory(2)
print(pow2(8))
pow3 = pow_factory(3)
print(pow3(8))